<?php
$tid = (int)$_FANWE['request']['tid'];
if(!$tid)
	exit;

if($_FANWE['uid'] == 0)
	exit;

$topic = FS("Topic")->getTopicById($tid);
if(empty($topic) || $topic['uid'] != $_FANWE['uid'])
	exit;

FS("Topic")->deleteTopic($tid,false);
$result['status'] = 1;
outputJson($result);
?>